home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: streams & sinks
- Sent: 6/11/96 9:02 AM
- Received: 6/11/96 9:12 AM
- From: Kirk Swenson, kswenson@mail.keypress.com
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- RE>streams & sinks 6/11/96
-
- >I am trying to update my source to R1, and when I try to compile a
- >line constructing a FW_CWritableStream, I get an error because
- FW_CWritableStream,
- >takes a FW_OSink, and all the sink classes descend from
- >FW_PRandomAccessSink. Where have I gone wrong here? (BTW, I am using
- >code from the CD).
-
- FW_PRandomAccessSink has a conversion operator to FW_ORandomAccessSink
- defined by its base class, FW_TSOMPtr. The following code works for me to
- create a FW_CReadableStream. Something analogous should work for creating a
- FW_CWritableStream.
-
- void
- ImportFromFile( FW_OFileSpecification* iFileSpec)
- {
- FW_SOMEnvironment ev;
-
- // Create the FW_PFile from the specification
- FW_PFile tImportFile( ev, iFileSpec);
-
- // Create the sink
- FW_PFileSink tFileSink( ev, tImportFile);
-
- // Create the stream
- FW_CReadableStream tReadStream( tFileSink);
- }
-
- Kirk Swenson
- Senior Software Engineer
- Key Curriculum Press
- kswenson@keypress.com
-
-